package com.neo.base.traitTest.decoratorTest

/**
  * Created by hadoop on 6/15/17.
  */
abstract class Check {
  def check() : String = "check application details ...  "
}

trait CreditCheck extends Check {
  override def check() : String = "Checked Credit..." + super.check()
}

trait EmploymentCheck extends Check {
  override def check() : String = "Checked Employment..." + super.check()
}

trait CriminalRecordCheck extends Check {
  override def check() : String = "Check Criminal Records..." + super.check()
}

object checkTest{
  def main(args: Array[String]): Unit = {
    val apartmentApplication = new Check with CreditCheck with CriminalRecordCheck

    println(apartmentApplication check())

  }
}